<?php

namespace app\common\model;

use think\Model;

class CompanyBuilding extends Model
{
    // 表名
    protected $name = 'company_building';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    
    public function company()
    {
        return $this->belongsTo('Company', 'company_id', 'id');
    }
    
    public function building()
    {
        return $this->belongsTo('Building', 'building_id', 'id');
    }
} 